<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <!-- 使用解构赋值，实现两个变量的值的交换 -->
    <script>
        let a = 36;
        let b = 45;
        [a, b] = [b, a];
        console.log(a); //45
        console.log(b); //36
    </script>
</body>

</html>